<?php
/**
 * View do formulário de projeto
 * @filesource  07/04/2011
 * @author      Estrada Virtual <http://estradavirtual.com.br>
 * @copyright   Copyright <2011> Estrada Virtual
 * @package     <<application>>
 * @subpackage  <<application>>.application.views
 * @version     $Id$
 */
 ?>
<div class="ev-formulario">

    <div class="tit-page">
        <h2><?php echo $this->translate('id_projeto'); ?></h2>
    </div>

    <form action="<?php echo $this->baseUrl() ?>/projeto/projeto/gravar" method="post" name="formulario" id="formulario">
        <fieldset>
            <input type="hidden" name="id_projeto" id="id_projeto" value="<?php echo $this->row->id_projeto; ?>" />

            <div class="campo">
                <label for="fk_cliente"><?php echo $this->translate('fk_cliente'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <?php echo $this->formSelect( "fk_cliente", $this->row->fk_cliente, array( "id" => "fk_cliente", "title" => $this->translate("fk_cliente"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_cliente"]); ?>
            </div>

            <div class="campo">
                <label for="fk_tipo_projeto"><?php echo $this->translate('fk_tipo_projeto'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <?php echo $this->formSelect("fk_tipo_projeto", null, array( "id" => "fk_tipo_projeto", "title" => $this->translate("fk_tipo_projeto"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_tipo_projeto"]); ?>
            </div>

            <div class="campo">
                <label for="fk_apoio_situacao"><?php echo $this->translate('fk_apoio_situacao'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <?php echo $this->formSelect( "fk_apoio_situacao", $this->row->fk_apoio_situacao, array( "id" => "fk_apoio_situacao", "title" => $this->translate("fk_apoio_situacao"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_apoio_situacao"]); ?>
            </div>

            <div class="campo">
                <label for="st_nome"><?php echo $this->translate('st_nome'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <input class="text ui-widget-content ui-corner-all required " type="text" name="st_nome" id="st_nome" value="<?php echo $this->row->st_nome; ?>" title="<?php echo $this->translate("st_nome"); ?>"  maxlength="200" />
            </div>

            <div class="campo">
                <label for="vl_valor"><?php echo $this->translate('vl_valor'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <input class="text ui-widget-content ui-corner-all valor required " type="text" name="vl_valor" id="vl_valor" value="<?php echo $this->row->vl_valor; ?>" title="<?php echo $this->translate("vl_valor"); ?>"   />
            </div>

            <div class="campo">
                <label for="dt_inicio"><?php echo $this->translate('dt_inicio'); ?>: </label>
                <input class="text ui-widget-content ui-corner-all data" type="text" name="dt_inicio" id="dt_inicio" value="<?php echo $this->dateFormat($this->row->dt_inicio); ?>" title="<?php echo $this->translate("dt_inicio"); ?>"  maxlength="45" />
            </div>

            <div class="campo">
                <label for="dt_fim"><?php echo $this->translate('dt_fim'); ?>: </label>
                <input class="text ui-widget-content ui-corner-all data" type="text" name="dt_fim" id="dt_fim" value="<?php echo $this->dateFormat($this->row->dt_fim); ?>" title="<?php echo $this->translate("dt_fim"); ?>"   />
            </div>

            <div class="campo">
                <label for="dt_previsao_inicio"><?php echo $this->translate('dt_previsao_inicio'); ?>: </label>
                <input class="text ui-widget-content ui-corner-all data" type="text" name="dt_previsao_inicio" id="dt_previsao_inicio" value="<?php echo $this->dateFormat($this->row->dt_previsao_inicio); ?>" title="<?php echo $this->translate("dt_previsao_inicio"); ?>"   />
            </div>
                        
            <div class="campo">
                <label for="dt_previsao_fim"><?php echo $this->translate('dt_previsao_fim'); ?>: </label>
                <input class="text ui-widget-content ui-corner-all data" type="text" name="dt_previsao_fim" id="dt_previsao_fim" value="<?php echo $this->dateFormat($this->row->dt_previsao_fim); ?>" title="<?php echo $this->translate("dt_previsao_fim"); ?>"   />
            </div>            
            
            <div class="campo">
                <label for="st_svn"><?php echo $this->translate('st_svn'); ?>: </label>
                <input class="text ui-widget-content ui-corner-all" type="text" name="st_svn" id="st_svn" value="<?php echo $this->row->st_svn; ?>" title="<?php echo $this->translate("st_svn"); ?>"  maxlength="45" />
            </div>

            <div class="ev-option-buttons">
                <button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="submit" class="btSalvar" name="enviar" id="enviar">
                    <span class="ui-button-text">Entrar</span>
                </button>
                <button class="btExcluir ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" name="cancelar" id="cancelar">
                    <span class="ui-button-text">Cancelar</span>
                </button>
            </div>
        </fieldset>
    </form>
</div>

<script type="text/javascript">
    $().ready(function() {
        $("form").validate();
        $('#cancelar').click(function(){
            window.location = "<?php echo $this->baseUrl() ?>/projeto/projeto";
        });
    });
</script>